def cola_supplement(stock, *args):
    """
    实现具体的逻辑并返回需要补充的可乐数量
    :param stock: 初始库存，字典形式，如 {"可口可乐": 10, "百事可乐": 2, "零度可乐": 0, "芬达": 6, "健怡可乐": 4}
    :param args: 每位客人可能喝的可乐品牌，集合形式，如 p1, p2, p3, p4, p5
    :return: 需要补充的可乐数量，字典形式
    """
    # 统计每种饮料被多少位客人偏好
    preference_count = {k: 0 for k in stock.keys()}
    for preferences in args:
        for cola in preferences:
            if cola in preference_count:
                preference_count[cola] += 1

    # 计算每种饮料的最小需求量
    required_stock = {}
    for cola, count in preference_count.items():
        required_stock[cola] = count

    # 计算需要补充的数量
    supplement = {}
    for cola, required in required_stock.items():
        if required > stock[cola]:
            supplement[cola] = required - stock[cola]

    return supplement


if __name__ == '__main__':
    # 初始库存
    initial_stock = {"可口可乐": 10, "百事可乐": 2, "零度可乐": 0, "芬达": 6, "健怡可乐": 4}

    # 每位客人可能喝的可乐品牌
    p1 = {"可口可乐", "零度可乐", "芬达", "健怡可乐"}
    p2 = {"百事可乐", "零度可乐", "健怡可乐"}
    p3 = {"可口可乐", "百事可乐", "芬达"}
    p4 = {"零度可乐", "芬达", "健怡可乐"}
    p5 = {"可口可乐", "百事可乐", "健怡可乐"}

    # 调用函数并打印结果
    result = cola_supplement(initial_stock, p1, p2, p3, p4, p5)
    print("需要补充的可乐有：", result)  # 需要补充的可乐有： {'百事可乐': 1, '零度可乐': 3}